/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package batailledesardennes.game;

/**
 *
 * @author charly
 */
public class GameUtils {
   public static boolean rect1InRect2(float leftX1, float topY1, float width1, float height1,
                                      float leftX2, float topY2, float width2, float height2) {
      if (leftX1 + width1 < leftX2) {
         return false;
      }
      if (leftX1 > leftX2 + width2) {
         return false;
      }
      if (topY1 + height1 < topY2) {
         return false;
      }
      if (topY1 > topY2 + height2) {
         return false;
      }
      return true;
   }
}
